db.getCollection('CriteriaLevel3').update({}, {$set: {"isActiveCategory": true}}, false, true);

var idCriteriaLevel2 = db.getCollection('CriteriaLevel2').findOne({Name:"Material E&S Issues",ShortName:"RiskRatings"})._id;

db.getCollection('CriteriaLevel3').update({$and : [
        {CriteriaLevel2Id: idCriteriaLevel2},
        { $or : [ 
                    { Category : "Animal Welfare" },
                    { Category : "Animal Welfare - Supply Chain" }, 
                    { Category : "Bribery and Corruption - Supply Chain" },
                    { Category : "Business Ethics - Supply Chain" },
                    { Category : "Carbon - Supply Chain" },
                    { Category : "Community Relations - Supply Chain" },
                    { Category : "Emissions, Effluents and Waste - Supply Chain" },
                    { Category : "Labour Relations - Supply Chain" },
                    { Category : "Occupational Health and Safety - Supply Chain" }
                    ] }
    ]}, {$set:{isActiveCategory:false}},{multi:true}
);



